//
//  ActionModel.h
//  Mahjong
//
//  Created by 饶首建 on 17/5/22.
//  Copyright © 2017年 com.ikamobile.com. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "PlayerModel.h"

typedef void(^LoadActionSuccess)(id model);
typedef void(^LoadActionFail)(NSString *errorStr);

@interface ActionModel : NSObject

@property (nonatomic,copy) NSString *actionId;
@property (nonatomic,copy) NSString *actionType;
@property (nonatomic,strong) NSArray *attributesArr;

@property (nonatomic,assign) NSInteger score;
@property (nonatomic,assign) NSInteger times;

@property (nonatomic,strong) NSArray *targetsArr;
@property (nonatomic,strong) NSArray *targetPlayerIdArr;
@property (nonatomic,strong) NSArray *targetPlayerNameArr;

@property (nonatomic,strong) PlayerModel *owner;
@property (nonatomic,strong) PlayerModel *transferedTo;
@property (nonatomic,strong) NSArray *caguaArr;
@property (nonatomic,strong) NSArray *caguaPlayerIdArr;
@property (nonatomic,strong) NSArray *caguaPlayerNameArr;

@property (nonatomic,assign) BOOL returned;//反雨标记

@property (nonatomic,copy) NSString *displayName;

+(void)loadActionsByGameId:(NSString*)gameId success:(LoadActionSuccess)success fail:(LoadActionFail)fail;

+(void)putActionByGameId:(NSString*)gameId actionId:(NSString*)actionId param:(NSDictionary*)param success:(LoadActionSuccess)success fail:(LoadActionFail)fail;
+(void)deleteActionByGameId:(NSString*)gameId actionId:(NSString*)actionId success:(LoadActionSuccess)success fail:(LoadActionFail)fail;


+(ActionModel*)parseDic:(NSDictionary*)dic;

@end
